package com.xiaoy.core.database.form.entity;

import javax.persistence.Entity;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.xiaoy.core.database.util.store.config.ConfigTable;
/**
 * 字段表
 * @author chentianyi
 * 2014年6月10日 上午11:43:50
 */
@Entity
@Table(name=ConfigTable.FIELD_TABLENAME)
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Field extends Business{

	private static final long serialVersionUID = 1L;
	//long id;
	protected String tableName; 	// 数据库表名
	protected String label;         // 数据库表的字段显示的字段
	protected String showType;      // 呈现方式， text,select,checkbox...
	
	protected String type;			// 是报表还是新增或者修改和删除
	protected String required;		// 是否必填
	
	protected String isSearch;		// 是否查询
	protected String isHidden;		// 是否隐藏
	protected String searchType;	// 
	protected String isOrder;
	protected String orderType;
	protected String isGroup;
	protected Long businessId;	// viewId 或者  insertId 或 deleteId 或者 updateId
	


	
	
	public Field (){}
	
	public Field (String tablename,String name,String label) {
		this.tableName = tablename;
		this.name = name;
		this.label = label;
	}
	
	public Field (String tablename,String name,String label, String showType) {
		this.tableName = tablename;
		this.name = name;
		this.label = label;
		this.showType = showType;
	}
	
	public String getTableName() {
		return tableName;
	}
	public void setTableName(String tableName) {
		this.tableName = tableName;
	}
	public String getLabel() {
		return label;
	}
	public void setLabel(String label) {
		this.label = label;
	}
	public String getShowType() {
		return showType;
	}
	public void setShowType(String showType) {
		this.showType = showType;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getRequired() {
		return required;
	}
	public void setRequired(String required) {
		this.required = required;
	}
	public Long getBusinessId() {
		return businessId;
	}
	public void setBusinessId(Long businessId) {
		this.businessId = businessId;
	}

	public String getIsSearch() {
		return isSearch;
	}
	public void setIsSearch(String isSearch) {
		this.isSearch = isSearch;
	}

	public String getIsHidden() {
		return isHidden;
	}

	public void setIsHidden(String isHidden) {
		this.isHidden = isHidden;
	}
	public String getSearchType() {
		return searchType;
	}

	public void setSearchType(String searchType) {
		this.searchType = searchType;
	}

	
	
}
